Overview:

DButil v1.1 is a Compaq designed utility that allows for the safe disk write queuing of a SQL Server 2000 database. 




DButil uses a simple command line interface to perform -pre and -post operations that will pause and resume writes to the disk of a SQL 2000 database. This function is required in order to safely create snapshots, to break off cloned or mirrored copies for subsequent re-mounting or to prepare the SQL database for transaction logs during recovery. DButil uses the Microsoft supported SQL Server Virtual Backup Device Interface for Snapshot Backup. 

Installation Instructions:

DButil v1.1 must be placed on one of the LUNs or Volumes of the SQL Server Database that you want to clone or snap. This will ensure that the metafile that is created (in the -pre step) stays with the clone that it is based upon and will be available during database recovery with transaction log backups using the -restorensns option. 

To install DBUtil v1.1 simply unzip it into a folder of your choice (eg c:\dbutil). DBUtil v1.1 is ready for use as soon as it is unzipped. DBUtil v1.1 uses a simple command line interface. From a command prompt cd into the folder where DBUtil v1.1 is placed. From there you can run the DBUtil v1.1 commands. You can also use or create *.bat files or scripts to automate the utility and schedules (see associated Solutions Guides for examples). 

To get the sample parameters simply type "DButil" and hit return. DButil v1.1 will return examples of input parameters.

Usage:

DButil v1.1 is intended to be used only with the Compaq StorageWorks Virtualized Storage Management for SQL Server 2000 and Rapid Restore for SQL Server 2000 Solutions, in conjunction with Compaq SANworks Virtual Replicator or Enterprise Volume Manager software.  Solutions Guides, which provide all necessary operating instructions for the DButil utility, can be downloaded from:

http://www.compaq.com/products/storageworks/solutions/rapidrestoresql/index.html (Rapid Restore for SQL Server 2000)

http://www.compaq.com/products/storageworks/solutions/vsm-sql2000/index.html (Virtualized Storage Management for SQL Server 2000)

Compaq has integrated DButil v1.1 into pre-defined scripts that allow an administrator to plan and schedule snapshots and the dismounting and mounting of clones. 

DButil uses three commands: The -PRE command,-POST command, and -RESTORESNS command. 

The -PRE command puts a SQL database into a paused state. It commits all transactions sent to cache to prevent torn pages and buffers all other transactions until the -post command is run. During this time, users are not effected and no active transactions are lost. 

The -POST command tells the database that the backup operations have completed and simply resumes normal operation. 	

The -RESTORESNS command puts the database into a "Loading" state allowing transactional logs to be applied.

NOTE1: The -pre command must always have a matching -post command to clean up any remaining windows and return SQL Server to its normal state.

NOTE2: The -restoresns command does NOT need a -post command but must always be followed by the application of one or more transactional logs to return the database to a normal state.  

Within these commands are parameters that must be customized by the user to call out specific server and database names. The 	user must specify the SQL server and optionally instance name, the database name, a trusted user name, and a password for that user.

A sample -PRE command is listed below:

DButil -pre <server\instance name> <database name> <user name> <password>

(The angle brackets represent customized inputs and are NOT entered)

Once the snapshot or dismount process is complete, the SQL application must be resumed in order to continue normal database operation. The -post command, shown in the example below, is used to resume the database activity.

Dbutil -post <server\instance name> <database name> <user name> <password>

(The angle brackets represent customized inputs and are NOT entered)

Example scripts are provided, within the associated Compaq Solutions Guides, as simple batch files created to automate these processes. These batch programs can then be scheduled to further automate the snapshot process.
